from fastapi import APIRouter, Depends
from app.crud.waveup.swap_record import get_record_by_uid
from app.api.deps import SessionDep, CurrentUser

router = APIRouter(tags=["swap-record"], prefix="/swap-record")

@router.get("/list")
async def get_user_swap_records(
    session: SessionDep,
    current_user: CurrentUser,
    pageNo: int = 1,
    pageSize: int = 20,
):
    """查询用户WaveUp兑换记录列表"""
    return await get_record_by_uid(
        session=session,
        uid=current_user.uid,
        pageNo=pageNo,
        pageSize=pageSize,
    )
